Optimal. Leaf size=74 \[ \frac {b \tanh ^{-1}\left (\frac {b+2 c x^n}{\sqrt {b^2-4 a c}}\right )}{a n \sqrt {b^2-4 a c}}-\frac {\log \left (a+b x^n+c x^{2 n}\right )}{2 a n}+\frac {\log (x)}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.350, Rules used = {1357, 705, 29, 634, 618, 206, 628} \[ \frac {b \tanh ^{-1}\left (\frac {b+2 c x^n}{\sqrt {b^2-4 a c}}\right )}{a n \sqrt {b^2-4 a c}}-\frac {\log \left (a+b x^n+c x^{2 n}\right )}{2 a n}+\frac {\log (x)}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 206
Rule 618
Rule 628
Rule 634
Rule 705
Rule 1357
Rubi steps
\begin {align*} \int \frac {1}{x \left (a+b x^n+c x^{2 n}\right )} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {1}{x \left (a+b x+c x^2\right )} \, dx,x,x^n\right )}{n}\\ &=\frac {\operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,x^n\right )}{a n}+\frac {\operatorname {Subst}\left (\int \frac {-b-c x}{a+b x+c x^2} \, dx,x,x^n\right )}{a n}\\ &=\frac {\log (x)}{a}-\frac {\operatorname {Subst}\left (\int \frac {b+2 c x}{a+b x+c x^2} \, dx,x,x^n\right )}{2 a n}-\frac {b \operatorname {Subst}\left (\int \frac {1}{a+b x+c x^2} \, dx,x,x^n\right )}{2 a n}\\ &=\frac {\log (x)}{a}-\frac {\log \left (a+b x^n+c x^{2 n}\right )}{2 a n}+\frac {b \operatorname {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^n\right )}{a n}\\ &=\frac {b \tanh ^{-1}\left (\frac {b+2 c x^n}{\sqrt {b^2-4 a c}}\right )}{a \sqrt {b^2-4 a c} n}+\frac {\log (x)}{a}-\frac {\log \left (a+b x^n+c x^{2 n}\right )}{2 a n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.14, size = 74, normalized size = 1.00 \[ -\frac {\frac {2 b \tan ^{-1}\left (\frac {b+2 c x^n}{\sqrt {4 a c-b^2}}\right )}{n \sqrt {4 a c-b^2}}+\frac {\log \left (a+x^n \left (b+c x^n\right )\right )}{n}-2 \log (x)}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.63, size = 259, normalized size = 3.50 \[ \left [\frac {2 \, {\left (b^{2} - 4 \, a c\right )} n \log \relax (x) + \sqrt {b^{2} - 4 \, a c} b \log \left (\frac {2 \, c^{2} x^{2 \, n} + b^{2} - 2 \, a c + 2 \, {\left (b c + \sqrt {b^{2} - 4 \, a c} c\right )} x^{n} + \sqrt {b^{2} - 4 \, a c} b}{c x^{2 \, n} + b x^{n} + a}\right ) - {\left (b^{2} - 4 \, a c\right )} \log \left (c x^{2 \, n} + b x^{n} + a\right )}{2 \, {\left (a b^{2} - 4 \, a^{2} c\right )} n}, \frac {2 \, {\left (b^{2} - 4 \, a c\right )} n \log \relax (x) + 2 \, \sqrt {-b^{2} + 4 \, a c} b \arctan \left (-\frac {2 \, \sqrt {-b^{2} + 4 \, a c} c x^{n} + \sqrt {-b^{2} + 4 \, a c} b}{b^{2} - 4 \, a c}\right ) - {\left (b^{2} - 4 \, a c\right )} \log \left (c x^{2 \, n} + b x^{n} + a\right )}{2 \, {\left (a b^{2} - 4 \, a^{2} c\right )} n}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{{\left (c x^{2 \, n} + b x^{n} + a\right )} x}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.10, size = 397, normalized size = 5.36 \[ \frac {4 a c \,n^{2} \ln \relax (x )}{4 a^{2} c \,n^{2}-a \,b^{2} n^{2}}-\frac {b^{2} n^{2} \ln \relax (x )}{4 a^{2} c \,n^{2}-a \,b^{2} n^{2}}+\frac {b^{2} \ln \left (x^{n}-\frac {-b^{2}+\sqrt {-4 a \,b^{2} c +b^{4}}}{2 b c}\right )}{2 \left (4 a c -b^{2}\right ) a n}+\frac {b^{2} \ln \left (x^{n}+\frac {b^{2}+\sqrt {-4 a \,b^{2} c +b^{4}}}{2 b c}\right )}{2 \left (4 a c -b^{2}\right ) a n}-\frac {2 c \ln \left (x^{n}-\frac {-b^{2}+\sqrt {-4 a \,b^{2} c +b^{4}}}{2 b c}\right )}{\left (4 a c -b^{2}\right ) n}-\frac {2 c \ln \left (x^{n}+\frac {b^{2}+\sqrt {-4 a \,b^{2} c +b^{4}}}{2 b c}\right )}{\left (4 a c -b^{2}\right ) n}+\frac {\sqrt {-4 a \,b^{2} c +b^{4}}\, \ln \left (x^{n}-\frac {-b^{2}+\sqrt {-4 a \,b^{2} c +b^{4}}}{2 b c}\right )}{2 \left (4 a c -b^{2}\right ) a n}-\frac {\sqrt {-4 a \,b^{2} c +b^{4}}\, \ln \left (x^{n}+\frac {b^{2}+\sqrt {-4 a \,b^{2} c +b^{4}}}{2 b c}\right )}{2 \left (4 a c -b^{2}\right ) a n} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{{\left (c x^{2 \, n} + b x^{n} + a\right )} x}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.61, size = 224, normalized size = 3.03 \[ \frac {\ln \left (-\frac {1}{c\,x}-\frac {\left (2\,a\,n+b\,n\,x^n\right )\,\left (4\,a\,c+b\,\sqrt {b^2-4\,a\,c}-b^2\right )}{2\,c\,x\,\left (a\,b^2\,n-4\,a^2\,c\,n\right )}\right )\,\left (4\,a\,c+b\,\sqrt {b^2-4\,a\,c}-b^2\right )}{2\,\left (a\,b^2\,n-4\,a^2\,c\,n\right )}-\frac {\ln \left (\frac {\left (2\,a\,n+b\,n\,x^n\right )\,\left (b\,\sqrt {b^2-4\,a\,c}-4\,a\,c+b^2\right )}{2\,c\,x\,\left (a\,b^2\,n-4\,a^2\,c\,n\right )}-\frac {1}{c\,x}\right )\,\left (b\,\sqrt {b^2-4\,a\,c}-4\,a\,c+b^2\right )}{2\,\left (a\,b^2\,n-4\,a^2\,c\,n\right )}+\frac {\ln \relax (x)\,\left (n-1\right )}{a\,n} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________